<div class="container">

  <div class="row">
    <div class="col-md-12">
      <div class="page-header">
        <h1><%= @website_section.title %></h1>
      </div>
    </div>

    <div class="col-md-8">

      <% @contents.each do |content| %>
          <div id="blog_<%= h content.id %>">
            <h4><%= content.title %></h4>

            <p>
              Posted: <%= content.created_at.to_s(:long) %> <%= published_content_created_by %><br/>
              Topics: <%= content.content.pretty_tag_list %>
            </p>

            <p>
              <%= raw content.excerpt_html %>
            </p>

            <div><%= link_to 'Read More...', main_app.blog_article_path(@website_section.id, content.permalink) %></div>

          </div>
      <% end %>

      <%= blog_pagination 'blog_pagination', params %>

    </div>

    <div class="col-md-4">
      <div>
        <h4>Topics</h4>
        <%= blog_topics 'tag_link' %>
      </div>

      <div>
        <h4>Links</h4>
        <%= blog_rss_links 'RSS Feed' %>
      </div>

      <div>
        <% #Optional Parameters:
           # content_type: Leave blank to search all section types, set to Blog to only search Blog articles
           # section_unique_name: Leave blank to search all pages if passed will confine search to a particular
           #  pages content
           # search_url: Main search url, only needed if results are being redirected
           # redirect_results: If true will redirect to search page to display results.  Used for inline search
           #   boxes
           # per_page: Number of results per page
        %>
        <%= render_widget :search,
                          :params => set_widget_params({
                                                               :content_type => 'Blog',
                                                               :section_unique_name => @blog.internal_identifier,
                                                               :per_page => 2
                                                       }) %>
      </div>
    </div>
  </div>

</div>